//
// Created by hay boy on 2022/7/8.
//

#ifndef ALGORITHMS_DICTIONARY_H
#define ALGORITHMS_DICTIONARY_H
#include <iostream>
#include <unordered_map>
using namespace std;
template<class K,class E>
class Dictionary{
public:
    virtual ~Dictionary()= default;
    virtual bool empty() const = 0;
    virtual int size() const = 0;
    virtual void clear() = 0;
    virtual pair<const K,E>* find(const K&) const = 0;
    virtual void erase(const K&) = 0;
    virtual void insert(const pair<const K, E> &) = 0;
};
template<class K,class E>
ostream& operator<<(ostream &out, const pair<K,E> &x) {
    out<<x.first<<' '<<x.second<<endl;
    return out;
}
#endif //ALGORITHMS_DICTIONARY_H
